package com.oracle.application.controller;

import com.oracle.application.feign.AdminFeign;
import com.oracle.application.feign.vo.AdminsVo;
import com.oracle.application.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin")
public class AdminController {

    @Autowired
    private AdminFeign adminFeign;

    @PostMapping("/pwd")
    public R<AdminsVo> adminByPwd(@RequestBody AdminsVo admins){
        return  this.adminFeign.adminByPwd(admins);
    }

    @GetMapping("/delete")
    public R deleteByAdmin(Integer id){
        return this.adminFeign.deleteByAdmin(id);
    }
}
